Linq - Random Elements

48

Linq - Random Elements -

var rnd = new Random();
var SelectedPost = q.OrderBy(x => rnd.Next()).Take(1);

Comments

Submit
0 Comments